import http from "@/utils/http";
import {EnumAlias} from "@/utils/common";

export function formElementPage(params?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/formElement/page`,
    method: "get",
    params
  });
}

export function formElementList(params?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/formElement/list`,
    method: "get",
    params
  });
}

export function formElementAdd(data?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/formElement/create`,
    method: "post",
    data
  });
}

export function formElementUpdate(data?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/formElement/update`,
    method: "post",
    data
  });
}

export function formElementDetail(params?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/formElement/detail`,
    method: "get",
    params
  });
}

export function formElementDelete(data?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/formElement/delete`,
    method: "post",
    data
  });
}

export function formElementExport(params?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/formElement/export`,
    method: "get",
    params
  });
}

export function formElementChangeStatus(data?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/formElement/changeStatus`,
    method: "post",
    data
  });
}
